import http from "@/api/axios";

export const getListApi = (data: ClientAccountManagement.SearchForm) => {
  return http({
    method: "post",
    url: "/base/biz/customer/pageEmp",
    data
  });
};
export const addCustomerAccountApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/customer/addEmp",
    data
  });
};
export const enabledCustomerAccountApi = (data: { id: string }) => {
  return http({
    method: "post",
    url: "/base/biz/customer/enabledEmp",
    data
  });
};
export const disabledCustomerAccountApi = (data: { id: string }) => {
  return http({
    method: "post",
    url: "/base/biz/customer/disabledEmp",
    data
  });
};
export const deleteCustomerAccountApi = (data: { id: string }) => {
  return http({
    method: "delete",
    url: "/base/biz/customer/deletedEmp",
    data
  });
};
export const modifyCustomerAccountApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/customer/updateEmp",
    data
  });
};
// 用户详情
export const getCustomerInfoApi = (data: { id: string }) => {
  return http({
    method: "post",
    url: "/base/biz/customer/detailsEmp",
    data
  });
};
// 获取部门列表
export const getDepartmentApi = (data: Base.GeneraDataType) => {
  return http({
    method: "post",
    url: "/base/biz/customer/dept/page",
    data
  });
};
// 删除部门
export const deleteDepartmentApi = (data: { id: string }) => {
  return http({
    method: "delete",
    url: "/base/biz/customer/dept",
    data
  });
};
// 新增部门
export const addDepartmentApi = (data: { name: string }) => {
  return http({
    method: "post",
    url: "/base/biz/customer/dept",
    data
  });
};
// 编辑部门
export const editDepartmentApi = (data: { id: string; name: string }) => {
  return http({
    method: "put",
    url: "/base/biz/customer/dept",
    data
  });
};
